<template>
  <div id="app">
    <!-- <p v-upper="msg"></p> -->
    <Header></Header>
    <router-view></router-view>
    <!-- 在search和home页面显示 通过路由元信息meta控制 -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from '@/components/Header/index.vue'
import Footer from '@/components/Footer/index.vue'
export default {
  name: 'app',
  data() {
    return {
      msg: 'abc'
    }
  },
  components: {
    Header,
    Footer
  },
  mounted() {
    // 通知vuex发请求拿数据，存储在仓库中
    this.$store.dispatch('categoryList')
  }
}
</script>

<style lang="less" scoped></style>
